﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Meraz.Core.Config;
using System.Net.Mail;

namespace Meraz.Core.Net
{
    public class LogReport : MailInfo
    {
        public LogReport(IEnumerable<string> files, IUser user, DateTime start, DateTime end)
        {
            Message = new MailMessage();
            Message.To.Add(new MailAddress(user.Email));
            Message.Subject = string.Format(Resources.Mail.LogReportSubject, start, end); 
            Message.IsBodyHtml = true;
            Message.Body = string.Format(Resources.Mail.LogReportBody, user.DisplayName, start, end);
            AddAttachments(files);
        }
    }
}
